<!--{template "topic_header"}-->
<style type="text/css">
ul.mycon li{ width:65px;}
.tabnav{ margin:20px auto; width:610px; height:40px; line-height:40px; border-bottom:1px solid #e2e2e2;}
.tabnav h2{ float:left; margin:0;}
.tabnav .em_send{ display:inline; font-size:12px; margin-left:10px; font-weight:500;}
.letterBox .text-area{ width:600px;}
.letterBox .letterBox_b .btnText{ float:right; margin:10px 0 0 0;}

.menu_fjb .arrow-up, .menu_fjb .arrow-up-in{ left:98px; top:-9px;}
.menuf_fj .menu_fjb_c1,.menuf_tq .menu_tqb_c1{position:absolute;top:5px;right:5px;}
</style>  
</style>
<div class="main">    

  <div class="mainWrap Wrapbg">
    <div class="tabnav">
      <h2>我和&nbsp;{$nickname}&nbsp;的对话<a href="index.php?mod=pm&code=send&folder=send" class="em_send">发私信</a></h2>
      
      <span class="mright"><a href="index.php?mod=pm&code=list">返回我的私信</a></span>
    </div>
    
    <script type="text/javascript">
	 $(document).ready(function() {
		 //表情
		 $(".menu_bqb_c").click(function(){
		 	$("#msg_showface").show();
		 	$(".menu_tqb").hide();
		 	$(".menu_fjb").hide();
		 });
		 //图片 
		 $(".menu_tqb_c").click(function(){
		 	$(".menu_tqb").show();
			$("#msg_showface").hide();
			$(".menu_fjb").hide();
		 });
		 $('#pubImg').click(function(){$("#publisher_file").style.posLeft=event.x-offsetWidth/2;$("#publisher_file").style.posTop=event.y-offsetHeight/2;});
		 $(".menu_tqb_c1").click(function(){$(".menu_tqb").hide();});
		 $("#publishSubmit").click(function(){$(".menu_tqb").hide();});
		 //附件 
		 $(".menu_fjb_c").click(function(){
		 	$(".menu_fjb").show();
		 	$(".menu_tqb").hide();
			$("#msg_showface").hide();
		 });
		 $('#pubAttach').click(function(){$("#publisher_file_attach").style.posLeft=event.x-offsetWidth/2;$("#publisher_file_attach").style.posTop=event.y-offsetHeight/2;});
		 $(".menu_fjb_c1").click(function(){$(".menu_fjb").hide();});
		 $("#publishSubmit").click(function(){$(".menu_fjb").hide();});
	 })
	 </script>
    
    <!--{if $touid > 0}-->
    <!--此处发布框-->
    <div class="letterBox" style="width:610px; margin:0 auto;">
      <div class="letterBox_b" style="width:610px;">
        <p>发私信给&nbsp;{$nickname}</p>
        <p>
      	  <input type="hidden" id="to_user" name="to_user" value="{$nickname}">
          <textarea id="message" class="text-area" name="message" rows="3" cols="50"></textarea>
          
    <div style="margin-top:10px; float:left; position:relative">
    <style>
    .menuf_bq{ position:static; width:30px; float:left;}
	ul.imgList{ width:540px;}
    </style>
    <!--{if $this->Config['face_enable']}-->
      <div class="menuf_bq" id="editface"><b class="menu_bqb_c"><a href="javascript:void(0);" onclick="topic_face('msg_showface','message','topic_face');return false;" style="color:#666;">表情</a></b>
         <div id="msg_showface" class="showface"></div>
      </div>
    <!--{/if}--> 
    
    
    
    <!--{if $this->Config['image_enable']}-->
    <div id="pm_image_uploadify" class="comment_p_b2 comment_p_b22">
       <div class="menuf_tq" onclick="imageUploadifyHTML('', 'message', 'pm_image_uploadify', '1');"><b class="menu_tqb_c">图片</b></div>
    </div>
    <!--{/if}-->
    <!--{if $this->Config['attach_enable']}-->
    <div id="pm_attach_uploadify" class="comment_p_b2 comment_p_b22">
       <div class="menuf_fj menu_fj_reply_style s" onclick="attachUploadifyHTML('', 'message', 'pm_attach_uploadify', '1', '', '0');"><b class="menu_fjb_c">附件</b></div>
    </div>
    <!--{/if}-->
	</div>
    
          <!--{if $this->Config['seccode_sms'] && $this->yxm_title}-->
		  <input type="button" class="btnText" value="发送" onclick="YXM_popBox(this,'sms','{$this->yxm_title}');"/>
		  <!--{else}-->
		  <button id="submit" class="btnText" onclick="sendMsg();">发 送</button>
		  <!--{/if}-->
        </p>
      </div>
    </div>
    <!--此处发布框-->
    <!--{/if}-->
    
    <div id="msg"></div>
    <div id="msgList" class="msg_list">
	  {template "msg_list_ajax"}
    </div>
  </div>
<!--{template "topic_right.inc"}-->
</div>
<!--{template "topic_footer"}-->
<script type="text/javascript">
function msgList(){
	$.post(
		'ajax.php?mod=pm&code=msglist&uid=$touid',
		function(d){
			$('#msgList').html(d);
			show_message('私信发送成功',1);
			$('#msg').val('');
			$('#message').val('');
			$('#message').focus();
		}
	);
}
$("#message").bind('keydown',function(event){
	event = event || window.event;
    if (event.keyCode == 13 && event.ctrlKey) {
        $("#submit").click();
    }
});
</script>
